package com.example.service;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.function.Consumer;

@Configuration
public class ConsumeMsg {

    @Bean
    public Consumer<String> produceMessage(){
        return msg ->{
            System.out.println("我是消费者"+msg);
        } ;
    }
}
